<template>
    <view class="header">
        <!-- <image style="position: absolute;" class="w-100" src="../../static/mine/mine_bg.png" mode=""></image> -->
        <view>
            <u-navbar title="我的" :is_show_left="false" bgColor="transparent" titleStyle="color:white" :fixed="false" />
            <view class="view-1 flex-c-s">
                <view class="flex-c">
                    <image class="image-1" v-if="DATA_STORE.userInfo.nickname" :src="$ossurl + DATA_STORE.userInfo.avatar" mode=""></image>
                    <image class="image-1" v-else src="/launch/logo.png" mode=""></image>
                    <view>
                        <view class="flex-c u-m-b-6">
                            <button  class="u-reset-button">
                                <text class="name">李金铭</text>
                            </button>
                           <!-- <button v-else open-type="getPhoneNumber" @getphonenumber="getphonenumber" class="u-reset-button">
                                <text class="name">点击登录</text>
                            </button> -->
                           <!-- <view @click="change_index_btn" style="padding-right: 30rpx; margin-top: 9rpx">
                                <image class="image-2" style="" src="/static/mine/a_bianji.png" mode=""></image>
                            </view> -->
                        </view>
                    </view>
                </view>
                <view class="posi flex-c-c" @click="changeShenFen" v-if="$store('data').userInfo?.status == 'hidden'">
                    <text>成为员工</text>
                </view>
            </view>
        </view>

        <a-change-info :show="chang_name_show" @close="chang_name_show = false" @success="chang_name_show = false" />
    </view>
</template>
<script>
export default {
    options: {
        styleIsolation: 'shared' // 解除样式隔离
    }
};
</script>
<script setup>
import { computed, ref } from 'vue';
const chang_name_show = ref(false);
const is_change_show = ref(false);
const DATA_STORE = uni.$store('data');

const getphonenumber = (e) => {
    uni.$loginByPhone(e);
};
const change_index_btn = (e) => {
    uni.$isLogin().then(() => {
        chang_name_show.value = true;
    });
};
const changeShenFen = (e) => {
   
    uni.$u.route('/pages/mine/add-file');
};
</script>
<style scoped lang="scss">
.header {
    width: 750rpx;
    height: 440rpx;
    position: relative;
    background: linear-gradient(180deg, $bg_color 0%, #96abf4 100%);
    .text-2 {
        font-family: PingFang SC, PingFang SC;
        font-weight: 400;
        font-size: 32rpx;
        color: #ededed;
        line-height: 28rpx;
    }

    .view-1 {
        padding: 18rpx 0 32rpx 16rpx;
        position: relative;

        .posi {
            // position: absolute;
            // right: 0;
            padding: 0 24rpx 0 42rpx;
            height: 52rpx;
            background: #facf90;
            border-radius: 32rpx 0rpx 0rpx 32rpx;
        }

        .image-1 {
            flex: 0 0 108rpx;
            width: 108rpx;
            height: 108rpx;
            border-radius: 50%;
            margin-right: 24rpx;
        }

        .image-2 {
            width: 36rpx;
            height: 36rpx;
            margin-left: 12rpx;
        }

        .image-3 {
            width: 40rpx;
            height: 40rpx;
            margin-left: 4rpx;
        }

        .posi {
            font-family: PingFang SC, PingFang SC;
            font-weight: 600;
            font-size: 36rpx;
            color: #7f4b00;
        }

        .name {
            font-family: PingFang SC, PingFang SC;
            font-weight: 600;
            font-size:36rpx;
            color: #ffffff;
        }
    }
}
</style>
